//
//  MyProductCell.m
//  WorkNest
//
//  Created by qbm360 on 15/7/14.
//  Copyright (c) 2015年 nest. All rights reserved.
//

#import "MyProductCell.h"

@interface MyProductCell ()

@property (weak, nonatomic) IBOutlet UIImageView *image;
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *count;
@property (weak, nonatomic) IBOutlet UILabel *price;

@end

@implementation MyProductCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

- (void)setModel:(ProductModel *)model {
    _model = model;
    [self.image setImageWithURL:[NSURL URLWithString:[UIUtil containString:_model.mainImage]] placeholderImage:[UIImage imageNamed:@"tupian"]];
    [self.name setText:_model.productName];
    [self.count setText:[NSString stringWithFormat:@"热销%@件",_model.bookedQuantity]];
    [self.price setText:[NSString stringWithFormat:@"￥%@",_model.quotation]];
}

@end
